import mongoose from "mongoose";
const charactersDataSchema = new mongoose.Schema(
  {
    userId: {
      type: mongoose.Schema.Types.ObjectId,
      required: true,
      ref: "User",
    }, // User集合的id
    name: { type: String, required: true }, // 名称
    title: { type: String, required: true }, // 标题
    desc: { type: String, required: true }, // 简介
    avatar: {
      type: String,
      default:
        "https://gitee.com/tx-feng/FengHuaWuQue/raw/Vue/Static/player/avatar/avatar11.avif",
    }, // 头像链接
    rightText: { type: String }, // 简介2
    bgVideo: { type: String }, // 背景视频链接
    leftImg: { type: String }, // 图片链接
    frameImg: { type: String }, // 头像框图片链接
    videoRight: { type: String }, // 视频链接2
    sortByNumber: { type: Number, required: true, default: 0 }, // 图层
  },
  { collection: "CharactersData" }
);

const CharactersData = mongoose.model("CharactersData", charactersDataSchema);

export default CharactersData;
